//
// Created by Administrator on 2025/6/15.
//

#ifndef GD32F450_BASE_SYSTEM_CONFIG_H
#define GD32F450_BASE_SYSTEM_CONFIG_H

#include "gd32f4xx.h"
#include "lwip/ip_addr.h"

#define SYSTEM_MAC_ADDR_SIZE 6

typedef struct {
    uint32_t magic;
    uint32_t dhcp_enabled;
    ip_addr_t ip;
    ip_addr_t netmask;
    ip_addr_t gateway;

    uint8_t mac_addr[SYSTEM_MAC_ADDR_SIZE];

} SYSTEM_CONFIG_T;

void system_config_init(void);

SYSTEM_CONFIG_T *system_config_get(void);

void system_config_save(void);

#endif //GD32F450_BASE_SYSTEM_CONFIG_H
